package com.emergency.evaluate.domain;

import com.emergency.base.domain.BaseEntity;
import com.emergency.base.domain.Plan;
import com.emergency.base.domain.Scenar;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * 评分表，主要记录评分人，评分时间，分数，对应的想定场景
 */
@Entity
@Table(name = "eva_manual")
public class Manual extends BaseEntity {

    //评分总分数
    private double pscore;

    //本次评分对应的想定场景ID
    @OneToOne (targetEntity=Scenar.class,fetch= FetchType.EAGER)
    @JoinColumn(name="scenar_id",referencedColumnName="id")
    private Scenar scenar;

    //本次评分对应的计划ID
    @OneToOne (targetEntity=Plan.class,fetch= FetchType.EAGER)
    @JoinColumn(name="plan_id",referencedColumnName="id")
    private Plan plan;



    //打分方式,1为人工，2为系统，3 为综合评估
    private  Integer method;



    /**临时属性*/
    @Transient
    private List<Score> scores;

    public Manual() {}

    public Manual(Long id) {
        super(id);
    }

    public double getPscore() {
        return pscore;
    }

    public void setPscore(double pscore) {
        this.pscore = pscore;
    }

    public Scenar getScenar() {
        return scenar;
    }

    public void setScenar(Scenar scenar) {
        this.scenar = scenar;
    }

    public List<Score> getScores() {
        return scores;
    }

    public void setScores(List<Score> scores) {
        this.scores = scores;
    }

    public Plan getPlan() {
        return plan;
    }

    public void setPlan(Plan plan) {
        this.plan = plan;
    }

    public Integer getMethod() {
        return method;
    }

    public void setMethod(Integer method) {
        this.method = method;
    }



}
